<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
// 网站地址
String netPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();
%>
<style type="text/css">
	.cutTitle{
		width: 400px;
		display:block;
		margin-left:0px;
		overflow:hidden;
		white-space:nowrap;
		text-overflow:ellipsis;
		text-overflow: ellipsis;/* IE/Safari */
		-ms-text-overflow: ellipsis;
		-o-text-overflow: ellipsis;/* Opera */
		-moz-binding: url("ellipsis.xml#ellipsis");/*FireFox*/ 
	}
</style>
<div>
<input type="hidden" name="pageSum" value="${pageSum}" id="pageSum"/>
<table width="100%" border="0" height="100%" cellpadding="0" cellspacing="0" class="yhgltable_1">
   <thead>
     <tr>
       <th  width="10%">公告ID</th>
       <th width="30%">公告主题</th>
       <th  width="20%">链接地址</th>
       <th width="10%">顺序</th>
	   <th width="10%">修改</th>
     </tr>
   </thead>
   <c:forEach items="${links}" var="linkInfo" varStatus="stats">
        <c:if test="${stats.index%2==0}">
		  <tr>
	    </c:if>
		<c:if test="${stats.index%2==1}">
		 <tr class="gray">
		</c:if>
           <td width="7%"><p>
               &nbsp;&nbsp;<input type="checkbox" name="group_box" value="${linkInfo.id}">
               ${linkInfo.id}</p></td>
           <td width="10%"><a class="cutTitle" title="${linkInfo.theme}">${linkInfo.theme}</a></td>
           <td width="10%"><a href="${linkInfo.url}" target="_blank">${linkInfo.url}</a></td>
           <td width="12%">
           		<img alt="位置上升" src="<%=basePath%>images/arrow_up.png" class="ifTop" style="width:20px;" title="位置上升" onclick="changePosStat(${linkInfo.id},0)"/>
           		<img alt="位置下降" src="<%=basePath%>images/arrow_down.png" class="ifTop" title="位置下降" style="width:20px;" onclick="changePosStat(${linkInfo.id},1)"/>
           		<input type="text" id="iftop_${linkInfo.id}" value="${stats.index+1}" readonly="readonly" style="width:20px;position: relative;top: -5px;"/>
           </td>
           <td width="8%"><div class="btn1" style="width: 110px;"><a href="javascript:void(0)" style="float: right;" onclick="toUpdate(${linkInfo.id})"><img src="<%=basePath%>images/xg.gif" />修改</a></div></td>
        </tr>
   </c:forEach>  
</table>
</div>
<style>
	.ifTop {
		cursor:pointer;
	}
</style>